import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询钱包充值金额配置列表
export function listWallet(data) {
  return request({
    url: '/market/wallet/walletList',
    method: 'post',
    data: data
  })
}

// 查询钱包充值金额配置详细
export function getWallet(walletId) {
  return request({
    url: '/market/wallet/' + parseStrEmpty(walletId),
    method: 'get'
  })
}

// 新增钱包充值金额配置
export function addWallet(data) {
  return request({
    url: '/market/wallet',
    method: 'post',
    data: data
  })
}

// 修改钱包充值金额配置
export function updateWallet(data) {
  return request({
    url: '/market/wallet',
    method: 'put',
    data: data
  })
}

// 删除钱包充值金额配置
export function delWallet(walletId) {
  return request({
    url: '/market/wallet/' + walletId,
    method: 'delete'
  })
}

// 钱包充值金额配置状态修改
export function changeWalletStatus(walletId, status) {
  const data = {
    walletId,
    status
  }
  return request({
    url: '/market/wallet/walletChangeStatus',
    method: 'put',
    data: data
  })
}
